import javax.swing.*;
import java.awt.*;

public class JFrameQQ extends JFrame {
    public static void main(String[] args) {
        new JFrameQQ();
    }

    public JFrameQQ(){

        //设置图片
        Image image = new  ImageIcon("Housework0828/picture/qq头像编辑.jpg").getImage();
        image = image.getScaledInstance(60,60,1);
        JLabel imageLabel = new JLabel(new ImageIcon(image));
        imageLabel.setBounds(180,110,60,60);
        this.add(imageLabel);

        Image img = new ImageIcon("Housework0828/picture/QQ上背景.jpeg").getImage();
        img = img.getScaledInstance(435,150,1);
        JLabel imgJLabel = new JLabel(new ImageIcon(img));
        imgJLabel.setBounds(0,-10,435,150);
        this.add(imgJLabel);

        //设置下拉框
        JComboBox comboBox = new JComboBox(new String[]{" ","347584470","123456789","666888999"});
        comboBox.setBounds(80,175,250,20);
        this.add(comboBox);

        //设置文本框
        JTextField text = new JTextField();
        text.setBounds(80,200,250,20);
        this.add(text);

        //设置标签组件
        JLabel jl = new JLabel("注册账号");
        jl.setBounds(20,260,60,15);
        this.add(jl);
        jl.setFont(new Font("宋体",0,10));

        //创建三个复选框
        JCheckBox box = new JCheckBox("自动登录");
        JCheckBox box1 = new JCheckBox("记住密码");
        box.setBounds(70,225,85,15);
        this.add(box);
        box1.setBounds(160,225,85,15);
        this.add(box1);


        //设置登录按钮
        this.setLayout(null);
        JButton button = new JButton("登录");
        button.setBounds(105,245,200,25);
        this.add(button);

        JButton button1 = new JButton("找回密码");
        button1.setBounds(250,225,85,15);
        this.add(button1);

        //设置窗体
        this.setSize(435,320);
        this.setVisible(true);
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo(null);
    }
}
